<?php

namespace Controller;

use Handler\ZoneHandler;
use Extension\Tools;

class RoomController extends BaseController {
	/**
	 * 转发房间数据
	 *
	 * @param unknown $clientId
	 * @param unknown $json
	 */
	public function mb_RoomData($clientId, $json) {
		$recNo = $json->recno;
		$token = $json->token;
		$user = $this->mb_CheckUserIsLogining ( $clientId, $recNo, $token );
		if ($user == false) {
			$this->mb_OutTextMessage ( $clientId, $recNo, ErrCode_Distance, ErrMsg_Distance );
			return;
		}
		ZoneHandler::mb_GetInstance ()->mb_RoomData ( $user->m_RoomId, $json, $user );
		Tools::mb_LogResult ( "$user->m_Name 发送房间数据到房间ID: $user->m_RoomId !" );
	}
}